function f  = new_pr_CT(p_cf_i,delta_i,mc_i,A1_i,x2_i,theta2,v_c,cf_salestax_i,cat_i,tier_i) % function computing counterfactual price equilibrium  
p_in=(p_cf_i.*(1+cf_salestax_i+tier_i))+cat_i./1000;
expmu_cf = expmu(theta2,v_c,x2_i,p_in);
expdelta_cf=exp(delta_i);
s_indiv=ind_shares(expdelta_cf,expmu_cf); 
s_mkt=mean(s_indiv,2);
price1=((mc_i+markup_sim(theta2,v_c,delta_i,s_indiv,A1_i,s_mkt)).*((1+cf_salestax_i+tier_i)))+cat_i./1000;
f=norm((p_in.*1000)-(price1.*1000));
end